package com.scaffold.authority.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import org.hibernate.annotations.Proxy;

/**
 * 用户权限
 * @ManyToMany User.id=UserAuthorityRelation.userId~UserAuthorityRelation.userId=Authority.id#name
 */
@Entity
@Proxy(lazy = false)
public class UserAuthorityRelation extends BasicBizEntity{
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = IDENTITY)
	private Long id;
	
	//@ref User#id
	private Long userId;
	//@ref Authority#id
	private Long authorityId;

	public UserAuthorityRelation() {
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getAuthorityId() {
		return authorityId;
	}

	public void setAuthorityId(Long authorityId) {
		this.authorityId = authorityId;
	}
	
}